package com.bwie.task;/**
 * @description: TODO
 * @author LiuWei Chen
 * @date 2025/7/23 17:57
 * @version 1.0
 */

import com.bwie.mapper.TbProdMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @description: TODO
 * @author HP
 * @date 2025/7/23 17:57
 * @version 1.0
 */
public class ProdTask {
    @Autowired
    TbProdMapper tbProdMapper;

    @Scheduled(cron = "0 0/1 * * * ?")
    public void upLoadProdTask() {
        System.out.println("开始执行定时上架商品");
        tbProdMapper.upLoadProdTask();
        System.out.println("结束执行定时上架商品");
    }

    @Scheduled(cron = "0 0/1 * * * ?")
    public void downLineProdTask() {
        System.out.println("开始执行定时下架商品");
        tbProdMapper.downLineProdTask();
        System.out.println("结束执行定时下架商品");
    }
}
